Replication package for “Corporate Diversification and Debt Maturity”

This document describes the replication package for the JFQA paper titled “Corporate Diversification and Debt Maturity” by Enrico Onali and Xiaoxia Ye.

Please note the code was written using MATLAB R2023b and Stata/SE 18.0; might not work properly in older versions of MATLAB and Stata. To avoid version incompatibility, please run the code in MATLAB R2023b and Stata/SE 18.0 or newer versions. The Parallel Computing Toolbox of MATLAB is required to run certain functions.

Instructions:

Replication code for Tables 3, 5 to 10, A1 to A3 is in 'stata_code.do'. Please note that the code can only generate pseudo tables, i.e., they do not match the results of the corresponding tables in the paper, as the code loads a pseudo dataset in the 'pseudo data' folder to produce these tables (see below for more details). 

Replication code for Figures 4 to 7 and Table 4 is in the 'MATLAB code' folder. Please note that Figures 6 and 7 and Table 4 are pseudo as the code loads a pseudo dataset in the 'pseudo data' folder to produce these figures and tables. Run 'main_script.m' in the 'MATLAB code' folder line by line to produce these figures and tables. The hierarchical dependency of functions is presented in 'Dependency Graph.pdf'. Specifically, Figure 4 is produced by calling the function 'debt_maturity_overhang_plots([], [], [], [], [], [], true, true)' in 'main_script.m'. Figure 5 is produced by calling the function 'opt_debt_maturity_plot(2.4, 0.4, 6)' in 'main_script.m'. 

Figure 6 and Table 4 are produced by calling the function '[validvec, ismultivec, dm_array_m2s, dm_array_s2m, aligned_x_axis, gvkey_vec_m2s, gvkey_vec_s2m, datatbl] = dm_before_after_div();
dm_bef_aft_plot_ttest_withmoreinfo(dm_array_m2s, dm_array_s2m, aligned_x_axis, gvkey_vec_m2s, gvkey_vec_s2m)' in 'main_script.m'. 

Figure 7 is produced by calling the function 'ev_emve_timeseries_plots()' in 'main_script.m'.


Figures 1 to 3 were produced using the TikZ package (https://tikz.net/). The tex code is in the 'tikz code' folder. Compiling 'Figures_1_to_3.tex' using standard LaTeX will reproduce Figures 1 to 3 in a pdf named 'Figures_1_to_3.pdf'. 


Pseudo data:

The full sample data cannot be shared publicly due to licensing restrictions. Therefore, we prepared a randomized version of our variables for the code to execute smoothly. These 'pseudo' data set is placed in the 'pseudo data' folder in different formats. The figures and tables produced using such 'pseudo' data will not match the results reported in the paper as a result of the randomization process. To reproduce the results of these tables and figures in the paper, please follow closely the data collection procedure and data sources outlined in section IV.A of the paper to construct the full sample and replace the pseudo datasets. 